package chatClient;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import IChat.IChatter;

public class ChatterImpl extends UnicastRemoteObject implements IChatter {
	
	ChatClient client;

	protected ChatterImpl(ChatClient client) throws RemoteException {
		this.client = client;
	}

	public void receiveEnter(String name, IChatter chatter, boolean hasEntered) throws RemoteException {
		client.receiveEnter(name, chatter, hasEntered);
	}
	
	public void receiveExit(String name) throws RemoteException {
		client.receiveExit(name);
	}
	
	public void receiveChat(String name, String message) throws RemoteException {
		client.receiveChat(name, message);
	}
	
	public void receiveWhisper(String name, String message) throws RemoteException {
		client.receiveWhisper(name, message);
	}
	
	public void serverStop() throws RemoteException {
		client.serverStop();
	}

}
